Class BatchProcessor<T,S>

java.lang.Object
edu.claflin.finder.logic.processor.BatchProcessor<T,S>
Type Parameters:
T - the object Type to be processed.
S - the expected output Type of the processing.

public final class BatchProcessor<T,S> extends Object
Used to process one or multiple objects. Processing is accomplished via a level of abstraction. This is the primary control structure of the SNBA code base.
Version:
3.1 May 28, 2015
Author:
Charles Allen Schultz II
  • Constructor Details

    • BatchProcessor

      public BatchProcessor()
      Constructs a BatchProcessor. Since a BatchProcessor object only relies on restrictions set using angle bracket operators, no other information is needed for proper instantiation.
  • Method Details

    • processSingular

      public ArrayList<S> processSingular(T toProcess, Processable<T,S> processor)
      Processes a singular object. Utilizes a system of abstraction to allow multiple parts of the program to rely on the same infrastructure for performing mass-processing.
      Parameters:
      toProcess - the T object to process.
      processor - the Processable object to process with.
      Returns:
      the S object array containing the results of the processing.
    • processMultiple

      public ArrayList<ArrayList<S>> processMultiple(T[] toProcess, Processable<T,S> processor)
      Processes multiple files. This method does so by calling the processSingular(T, Processable) method.
      Parameters:
      toProcess - the T object array containing the objects to be processed.
      processor - the Processable object to process the objects with.
      Returns:
      the S object two dimensional array containing the collective results of the processing.